import itertools

data = ['a', 'b', 'c', 'd', 'e']
selectors = [True, False, True, False, True]

result = itertools.compress(data, selectors)

for item in result:
    print(item)